3.513 \(\int \frac{\cos ^2(c+d x)}{(a+b \sec (c+d x))^3} \, dx\)

Optimal. Leaf size=296 \[ -\frac{3 b \left (-7 a^2 b^2+2 a^4+4 b^4\right ) \sin (c+d x)}{2 a^4 d \left (a^2-b^2\right )^2}+\frac{\left (-10 a^2 b^2+a^4+6 b^4\right ) \sin (c+d x) \cos (c+d x)}{2 a^3 d \left (a^2-b^2\right )^2}-\frac{b^3 \left (-29 a^2 b^2+20 a^4+12 b^4\right ) \tanh ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a^5 d (a-b)^{5/2} (a+b)^{5/2}}+\frac{b^2 \left (7 a^2-4 b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a^2 d \left (a^2-b^2\right )^2 (a+b \sec (c+d x))}+\frac{b^2 \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}+\frac{x \left (a^2+12 b^2\right )}{2 a^5} \]

[Out]

((a^2 + 12*b^2)*x)/(2*a^5) - (b^3*(20*a^4 - 29*a^2*b^2 + 12*b^4)*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a
 + b]])/(a^5*(a - b)^(5/2)*(a + b)^(5/2)*d) - (3*b*(2*a^4 - 7*a^2*b^2 + 4*b^4)*Sin[c + d*x])/(2*a^4*(a^2 - b^2
)^2*d) + ((a^4 - 10*a^2*b^2 + 6*b^4)*Cos[c + d*x]*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + (b^2*Cos[c + d*x]*Si
n[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (b^2*(7*a^2 - 4*b^2)*Cos[c + d*x]*Sin[c + d*x])/(2*a^
2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.998154, antiderivative size = 296, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3847, 4100, 4104, 3919, 3831, 2659, 208} \[ -\frac{3 b \left (-7 a^2 b^2+2 a^4+4 b^4\right ) \sin (c+d x)}{2 a^4 d \left (a^2-b^2\right )^2}+\frac{\left (-10 a^2 b^2+a^4+6 b^4\right ) \sin (c+d x) \cos (c+d x)}{2 a^3 d \left (a^2-b^2\right )^2}-\frac{b^3 \left (-29 a^2 b^2+20 a^4+12 b^4\right ) \tanh ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a^5 d (a-b)^{5/2} (a+b)^{5/2}}+\frac{b^2 \left (7 a^2-4 b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a^2 d \left (a^2-b^2\right )^2 (a+b \sec (c+d x))}+\frac{b^2 \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}+\frac{x \left (a^2+12 b^2\right )}{2 a^5} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^2/(a + b*Sec[c + d*x])^3,x]

[Out]

((a^2 + 12*b^2)*x)/(2*a^5) - (b^3*(20*a^4 - 29*a^2*b^2 + 12*b^4)*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a
 + b]])/(a^5*(a - b)^(5/2)*(a + b)^(5/2)*d) - (3*b*(2*a^4 - 7*a^2*b^2 + 4*b^4)*Sin[c + d*x])/(2*a^4*(a^2 - b^2
)^2*d) + ((a^4 - 10*a^2*b^2 + 6*b^4)*Cos[c + d*x]*Sin[c + d*x])/(2*a^3*(a^2 - b^2)^2*d) + (b^2*Cos[c + d*x]*Si
n[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + (b^2*(7*a^2 - 4*b^2)*Cos[c + d*x]*Sin[c + d*x])/(2*a^
2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x]))

Rule 3847

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(b^2*C
ot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n)/(a*f*(m + 1)*(a^2 - b^2)), x] + Dist[1/(a*(m + 1)
*(a^2 - b^2)), Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n*(a^2*(m + 1) - b^2*(m + n + 1) - a*b*(m + 1
)*Csc[e + f*x] + b^2*(m + n + 2)*Csc[e + f*x]^2), x], x] /; FreeQ[{a, b, d, e, f, n}, x] && NeQ[a^2 - b^2, 0]
&& LtQ[m, -1] && IntegersQ[2*m, 2*n]

Rule 4100

Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^
(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[((A*b^2 - a*b*B + a^2*C)*Cot[e + f*x]*(a +
 b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n)/(a*f*(m + 1)*(a^2 - b^2)), x] + Dist[1/(a*(m + 1)*(a^2 - b^2)), I
nt[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n*Simp[a*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C)*
(m + n + 1) - a*(A*b - a*B + b*C)*(m + 1)*Csc[e + f*x] + (A*b^2 - a*b*B + a^2*C)*(m + n + 2)*Csc[e + f*x]^2, x
], x], x] /; FreeQ[{a, b, d, e, f, A, B, C, n}, x] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] &&  !(ILtQ[m + 1/2, 0] &
& ILtQ[n, 0])

Rule 4104

Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^
(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(A*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m +
1)*(d*Csc[e + f*x])^n)/(a*f*n), x] + Dist[1/(a*d*n), Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n + 1)*Simp[
a*B*n - A*b*(m + n + 1) + a*(A + A*n + C*n)*Csc[e + f*x] + A*b*(m + n + 2)*Csc[e + f*x]^2, x], x], x] /; FreeQ
[{a, b, d, e, f, A, B, C, m}, x] && NeQ[a^2 - b^2, 0] && LeQ[n, -1]

Rule 3919

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[(c*x)/a,
x] - Dist[(b*c - a*d)/a, Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[
b*c - a*d, 0]

Rule 3831

Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[1/b, Int[1/(1 + (a*Sin[e
 + f*x])/b), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]

Rule 2659

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{\cos ^2(c+d x)}{(a+b \sec (c+d x))^3} \, dx &=\frac{b^2 \cos (c+d x) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}-\frac{\int \frac{\cos ^2(c+d x) \left (-2 a^2+4 b^2+2 a b \sec (c+d x)-3 b^2 \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^2} \, dx}{2 a \left (a^2-b^2\right )}\\ &=\frac{b^2 \cos (c+d x) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}+\frac{b^2 \left (7 a^2-4 b^2\right ) \cos (c+d x) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))}+\frac{\int \frac{\cos ^2(c+d x) \left (2 \left (a^4-10 a^2 b^2+6 b^4\right )-a b \left (4 a^2-b^2\right ) \sec (c+d x)+2 b^2 \left (7 a^2-4 b^2\right ) \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx}{2 a^2 \left (a^2-b^2\right )^2}\\ &=\frac{\left (a^4-10 a^2 b^2+6 b^4\right ) \cos (c+d x) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b^2 \cos (c+d x) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}+\frac{b^2 \left (7 a^2-4 b^2\right ) \cos (c+d x) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))}-\frac{\int \frac{\cos (c+d x) \left (6 b \left (2 a^4-7 a^2 b^2+4 b^4\right )-2 a \left (a^4+4 a^2 b^2-2 b^4\right ) \sec (c+d x)-2 b \left (a^4-10 a^2 b^2+6 b^4\right ) \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx}{4 a^3 \left (a^2-b^2\right )^2}\\ &=-\frac{3 b \left (2 a^4-7 a^2 b^2+4 b^4\right ) \sin (c+d x)}{2 a^4 \left (a^2-b^2\right )^2 d}+\frac{\left (a^4-10 a^2 b^2+6 b^4\right ) \cos (c+d x) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b^2 \cos (c+d x) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}+\frac{b^2 \left (7 a^2-4 b^2\right ) \cos (c+d x) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))}+\frac{\int \frac{2 \left (a^2-b^2\right )^2 \left (a^2+12 b^2\right )+2 a b \left (a^4-10 a^2 b^2+6 b^4\right ) \sec (c+d x)}{a+b \sec (c+d x)} \, dx}{4 a^4 \left (a^2-b^2\right )^2}\\ &=\frac{\left (a^2+12 b^2\right ) x}{2 a^5}-\frac{3 b \left (2 a^4-7 a^2 b^2+4 b^4\right ) \sin (c+d x)}{2 a^4 \left (a^2-b^2\right )^2 d}+\frac{\left (a^4-10 a^2 b^2+6 b^4\right ) \cos (c+d x) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b^2 \cos (c+d x) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}+\frac{b^2 \left (7 a^2-4 b^2\right ) \cos (c+d x) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))}-\frac{\left (b^3 \left (20 a^4-29 a^2 b^2+12 b^4\right )\right ) \int \frac{\sec (c+d x)}{a+b \sec (c+d x)} \, dx}{2 a^5 \left (a^2-b^2\right )^2}\\ &=\frac{\left (a^2+12 b^2\right ) x}{2 a^5}-\frac{3 b \left (2 a^4-7 a^2 b^2+4 b^4\right ) \sin (c+d x)}{2 a^4 \left (a^2-b^2\right )^2 d}+\frac{\left (a^4-10 a^2 b^2+6 b^4\right ) \cos (c+d x) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b^2 \cos (c+d x) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}+\frac{b^2 \left (7 a^2-4 b^2\right ) \cos (c+d x) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))}-\frac{\left (b^2 \left (20 a^4-29 a^2 b^2+12 b^4\right )\right ) \int \frac{1}{1+\frac{a \cos (c+d x)}{b}} \, dx}{2 a^5 \left (a^2-b^2\right )^2}\\ &=\frac{\left (a^2+12 b^2\right ) x}{2 a^5}-\frac{3 b \left (2 a^4-7 a^2 b^2+4 b^4\right ) \sin (c+d x)}{2 a^4 \left (a^2-b^2\right )^2 d}+\frac{\left (a^4-10 a^2 b^2+6 b^4\right ) \cos (c+d x) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b^2 \cos (c+d x) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}+\frac{b^2 \left (7 a^2-4 b^2\right ) \cos (c+d x) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))}-\frac{\left (b^2 \left (20 a^4-29 a^2 b^2+12 b^4\right )\right ) \operatorname{Subst}\left (\int \frac{1}{1+\frac{a}{b}+\left (1-\frac{a}{b}\right ) x^2} \, dx,x,\tan \left (\frac{1}{2} (c+d x)\right )\right )}{a^5 \left (a^2-b^2\right )^2 d}\\ &=\frac{\left (a^2+12 b^2\right ) x}{2 a^5}-\frac{b^3 \left (20 a^4-29 a^2 b^2+12 b^4\right ) \tanh ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a^5 (a-b)^{5/2} (a+b)^{5/2} d}-\frac{3 b \left (2 a^4-7 a^2 b^2+4 b^4\right ) \sin (c+d x)}{2 a^4 \left (a^2-b^2\right )^2 d}+\frac{\left (a^4-10 a^2 b^2+6 b^4\right ) \cos (c+d x) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b^2 \cos (c+d x) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}+\frac{b^2 \left (7 a^2-4 b^2\right ) \cos (c+d x) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))}\\ \end{align*}

Mathematica [A]  time = 2.04199, size = 199, normalized size = 0.67 \[ \frac{2 \left (a^2+12 b^2\right ) (c+d x)+\frac{2 a b^4 \left (10 a^2-7 b^2\right ) \sin (c+d x)}{(a-b)^2 (a+b)^2 (a \cos (c+d x)+b)}+\frac{4 b^3 \left (-29 a^2 b^2+20 a^4+12 b^4\right ) \tanh ^{-1}\left (\frac{(b-a) \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2-b^2}}\right )}{\left (a^2-b^2\right )^{5/2}}+a^2 \sin (2 (c+d x))+\frac{2 a b^5 \sin (c+d x)}{(b-a) (a+b) (a \cos (c+d x)+b)^2}-12 a b \sin (c+d x)}{4 a^5 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^2/(a + b*Sec[c + d*x])^3,x]

[Out]

(2*(a^2 + 12*b^2)*(c + d*x) + (4*b^3*(20*a^4 - 29*a^2*b^2 + 12*b^4)*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a
^2 - b^2]])/(a^2 - b^2)^(5/2) - 12*a*b*Sin[c + d*x] + (2*a*b^5*Sin[c + d*x])/((-a + b)*(a + b)*(b + a*Cos[c +
d*x])^2) + (2*a*b^4*(10*a^2 - 7*b^2)*Sin[c + d*x])/((a - b)^2*(a + b)^2*(b + a*Cos[c + d*x])) + a^2*Sin[2*(c +
 d*x)])/(4*a^5*d)

________________________________________________________________________________________

Maple [B]  time = 0.092, size = 827, normalized size = 2.8 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^2/(a+b*sec(d*x+c))^3,x)

[Out]

-1/d/a^3/(1+tan(1/2*d*x+1/2*c)^2)^2*tan(1/2*d*x+1/2*c)^3-6/d/a^4/(1+tan(1/2*d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)*(a-b))^(1/2))-12/d*b^7/a^5/(a^4-2*a^2*b^2+b^4)/((a+b)*(a-b))^(
1/2)*arctanh((a-b)*tan(1/2*d*x+1/2*c)/((a+b)*(a-b))^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2/(a+b*sec(d*x+c))^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.54114, size = 2541, normalized size = 8.58 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2/(a+b*sec(d*x+c))^3,x, algorithm="fricas")

[Out]

[1/4*(2*(a^10 + 9*a^8*b^2 - 33*a^6*b^4 + 35*a^4*b^6 - 12*a^2*b^8)*d*x*cos(d*x + c)^2 + 4*(a^9*b + 9*a^7*b^3 -
33*a^5*b^5 + 35*a^3*b^7 - 12*a*b^9)*d*x*cos(d*x + c) + 2*(a^8*b^2 + 9*a^6*b^4 - 33*a^4*b^6 + 35*a^2*b^8 - 12*b
^10)*d*x + (20*a^4*b^5 - 29*a^2*b^7 + 12*b^9 + (20*a^6*b^3 - 29*a^4*b^5 + 12*a^2*b^7)*cos(d*x + c)^2 + 2*(20*a
^5*b^4 - 29*a^3*b^6 + 12*a*b^8)*cos(d*x + c))*sqrt(a^2 - b^2)*log((2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x
+ c)^2 - 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b*cos(d*
x + c) + b^2)) - 2*(6*a^7*b^3 - 27*a^5*b^5 + 33*a^3*b^7 - 12*a*b^9 - (a^10 - 3*a^8*b^2 + 3*a^6*b^4 - a^4*b^6)*
cos(d*x + c)^3 + 4*(a^9*b - 3*a^7*b^3 + 3*a^5*b^5 - a^3*b^7)*cos(d*x + c)^2 + (11*a^8*b^2 - 43*a^6*b^4 + 50*a^
4*b^6 - 18*a^2*b^8)*cos(d*x + c))*sin(d*x + c))/((a^13 - 3*a^11*b^2 + 3*a^9*b^4 - a^7*b^6)*d*cos(d*x + c)^2 +
2*(a^12*b - 3*a^10*b^3 + 3*a^8*b^5 - a^6*b^7)*d*cos(d*x + c) + (a^11*b^2 - 3*a^9*b^4 + 3*a^7*b^6 - a^5*b^8)*d)
, 1/2*((a^10 + 9*a^8*b^2 - 33*a^6*b^4 + 35*a^4*b^6 - 12*a^2*b^8)*d*x*cos(d*x + c)^2 + 2*(a^9*b + 9*a^7*b^3 - 3
3*a^5*b^5 + 35*a^3*b^7 - 12*a*b^9)*d*x*cos(d*x + c) + (a^8*b^2 + 9*a^6*b^4 - 33*a^4*b^6 + 35*a^2*b^8 - 12*b^10
)*d*x - (20*a^4*b^5 - 29*a^2*b^7 + 12*b^9 + (20*a^6*b^3 - 29*a^4*b^5 + 12*a^2*b^7)*cos(d*x + c)^2 + 2*(20*a^5*
b^4 - 29*a^3*b^6 + 12*a*b^8)*cos(d*x + c))*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cos(d*x + c) + a)/((a^
2 - b^2)*sin(d*x + c))) - (6*a^7*b^3 - 27*a^5*b^5 + 33*a^3*b^7 - 12*a*b^9 - (a^10 - 3*a^8*b^2 + 3*a^6*b^4 - a^
4*b^6)*cos(d*x + c)^3 + 4*(a^9*b - 3*a^7*b^3 + 3*a^5*b^5 - a^3*b^7)*cos(d*x + c)^2 + (11*a^8*b^2 - 43*a^6*b^4
+ 50*a^4*b^6 - 18*a^2*b^8)*cos(d*x + c))*sin(d*x + c))/((a^13 - 3*a^11*b^2 + 3*a^9*b^4 - a^7*b^6)*d*cos(d*x +
c)^2 + 2*(a^12*b - 3*a^10*b^3 + 3*a^8*b^5 - a^6*b^7)*d*cos(d*x + c) + (a^11*b^2 - 3*a^9*b^4 + 3*a^7*b^6 - a^5*
b^8)*d)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos ^{2}{\left (c + d x \right )}}{\left (a + b \sec{\left (c + d x \right )}\right )^{3}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**2/(a+b*sec(d*x+c))**3,x)

[Out]

Integral(cos(c + d*x)**2/(a + b*sec(c + d*x))**3, x)

________________________________________________________________________________________

Giac [B]  time = 1.4158, size = 1037, normalized size = 3.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2/(a+b*sec(d*x+c))^3,x, algorithm="giac")

[Out]

-1/2*(2*(20*a^4*b^3 - 29*a^2*b^5 + 12*b^7)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(
1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(-a^2 + b^2)))/((a^9 - 2*a^7*b^2 + a^5*b^4)*sqrt(-a^2 + b^2)) +
 2*(a^7*tan(1/2*d*x + 1/2*c)^7 + 4*a^6*b*tan(1/2*d*x + 1/2*c)^7 - 13*a^5*b^2*tan(1/2*d*x + 1/2*c)^7 - 2*a^4*b^
3*tan(1/2*d*x + 1/2*c)^7 + 33*a^3*b^4*tan(1/2*d*x + 1/2*c)^7 - 17*a^2*b^5*tan(1/2*d*x + 1/2*c)^7 - 18*a*b^6*ta
n(1/2*d*x + 1/2*c)^7 + 12*b^7*tan(1/2*d*x + 1/2*c)^7 - 3*a^7*tan(1/2*d*x + 1/2*c)^5 - 4*a^6*b*tan(1/2*d*x + 1/
2*c)^5 - 5*a^5*b^2*tan(1/2*d*x + 1/2*c)^5 + 26*a^4*b^3*tan(1/2*d*x + 1/2*c)^5 + 29*a^3*b^4*tan(1/2*d*x + 1/2*c
)^5 - 67*a^2*b^5*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